#include "app_mqtt.h"
#include <stdio.h>

// 真正处理接收到数据的函数
static int app_mqtt_recv_callback(char *data, int len)
{
    printf("payload: %s\n", data);
    return 0;
}

int main(int argc, char const *argv[])
{
    int res = app_mqtt_init();
    if (res != 0)
    {
        printf("app_mqtt_init failed:%d \n", res);
    }
    // 注册接收数据的回调函数
    app_mqtt_register_callback(app_mqtt_recv_callback);

    return 0;
}
